package com.flyou.ccnucenter.adapter;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.flyou.ccnucenter.R;
import com.flyou.ccnucenter.domain.HenuBesideMapItem;

import java.util.List;

/**
 * ============================================================
 * 项目名称：HenuCenterPro
 * 包名称：com.flyou.henucenter.adapter
 * 文件名：HenuBesideMapAdapter
 * 类描述：
 * 创建人：flyou
 * 邮箱：fangjaylong@gmail.com
 * 创建时间：2015/12/12 21:54
 * 修改备注：
 * 版本：@version  V1.0
 * ============================================================
 **/
public class HenuBesideMapAdapter extends  SimpleBaseAdapter {
    public HenuBesideMapAdapter(Context context, List<HenuBesideMapItem> data) {
        super(context, data);
    }

    @Override
    public int getItemResource() {
        return R.layout.view_henu_beside_map_item;
    }

    @Override
    public View getItemView(int position, View convertView, ViewHolder holder) {
       HenuBesideMapItem henuBesideMapItem;
        Object item = getItem(position);
        henuBesideMapItem=(HenuBesideMapItem)item;
       ImageView imageView= (ImageView) holder.getView(R.id.henu_beside_map_image);
        TextView title= (TextView) holder.getView(R.id.henu_beside_map_title);
        imageView.setImageResource(henuBesideMapItem.getId());
        title.setText(henuBesideMapItem.getTitle());
        return convertView;
    }
}
